package com.lagou.io;

import javax.annotation.Resource;
import java.io.InputStream;

public class Resources {


    /**
     * @description: 通过类加载器来获取文件字节流
     * @author oyz
     * @param path 文件路径
     * @date 2022/10/16 8:46
     * @version 1.0
     */
    public static InputStream getResourceAsSteam(String path){
        InputStream resourceAsStream = Resources.class.getClassLoader().getResourceAsStream(path);
        return resourceAsStream;
    }
}
